<extend name="../layout" />

<block name="main_content">
    <div class="voucherWrap">
        <div class="voucherTop clearfix">
            <div class="markWrap">
                <span class="txt">凭证字</span>
                <span class="vchMark">
                    <select class="vchMarkSelect" id="vchMarkSelect">
                        <volist name="vocher_mark" id="vm" key="key">
                            <option value="{$vm.id}">{$vm.name}</option>
                        </volist>
                    </select>
                </span>
                <span class="vchNum" id="vch_num">
                    <input type="number" class="vchNumSelect" id="vchNumSelect" value="{$mark_num|default='1'}" min="{$mark_num|default='1'}" />
                </span>
                <span class="txt">号</span>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <span class="txt">日期</span>
                <span class="vchDate input-append date datepicker" data-date="" data-date-format="yyyy-mm-dd" id="vch_date">
                    <input type="text" value="{$CTS|toDate='Y-m-d'}" data-date="" data-date-format="yyyy-mm-dd"  />
                    <span class="add-on"><i class="icon icon-calendar"></i> </span>
                </span>
            </div>
            <div class="vchTitleWrap">
                <h1 class="vchTitle">记账凭证</h1>
                <span class="vchPeriod"><span id="vch_year">{$period.year}</span>年第<span id="vch_period">{$period.period}</span>期 </span>
            </div>
            <span class="vchAttachWrap">
                <span class="txt">附单据</span>
                <input type="number" class="vchNumSelect" min="1" id="vch_attach" value="0" maxlength="3" />
                <span class="txt">张</span>
            </span>
        </div>
        <form method="POST" action="" id="testt">
            <table class="voucherTable table table-bordered" id="voucherTable">
                <thead>
                    <tr>
                        <th class="col_operate">&nbsp;</th>
                        <th class="col_summary">摘要</th>
                        <th class="col_subject" colspan="2">会计科目</th>
                        <th class="col_money">
                            借方金额
                            <div class="money_unit"> 
                                <span>亿</span> 
                                <span>千</span> 
                                <span>百</span> 
                                <span>十</span> 
                                <span>万</span> 
                                <span>千</span> 
                                <span>百</span> 
                                <span>十</span> 
                                <span>元</span> 
                                <span>角</span> 
                                <span class="last">分</span> 
                            </div>
                        </th>
                        <th class="col_money">
                            贷方金额
                            <div class="money_unit"> 
                                <span>亿</span> 
                                <span>千</span> 
                                <span>百</span> 
                                <span>十</span> 
                                <span>万</span> 
                                <span>千</span> 
                                <span>百</span> 
                                <span>十</span> 
                                <span>元</span> 
                                <span>角</span> 
                                <span class="last">分</span> 
                            </div>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <for start="1" end="6">
                        <tr class="entry_item">
                            <td class="col_operate">
                                <div class="operate"><a title="增加分录" class="add"></a><a title="删除分录" class="del"></a></div>
                            </td>
                            <td class="col_summary" data-edit="summary"><div class="cell_val summary_val"></div></td>
                            <td class="col_subject" data-edit="subject"><div class="cell_val subject_val"></div></td>
                            <td class="col_option"><div class="option"><a class="selSub">科目</a></div></td>
                            <td class="col_debite" data-edit="money"><div class="cell_val debit_val"></div></td>
                            <td class="col_credit" data-edit="money"><div class="cell_val credit_val"></div></td>
                        </tr>
                    </for>
                </tbody>
                <tfoot>
                    <tr>
                        <td class="col_operate"></td>
                        <td colspan="3" class="col_total">合计：<span id="capAmount"></span></td>
                        <td class="col_debite"><div class="cell_val debit_total" id="debit_total"></div></td>
                        <td class="col_credit"><div class="cell_val credit_total" id="credit_total"></div></td>
                    </tr>
                </tfoot>
            </table>
        </form>
    </div>
    
    
    <div class="row-fluid">
        <div class="span10">
            <a class="btn btn-success" id="saveB">{:L("save")}</a>
        </div>
    </div>
</block>

<block name="footer_js">
    <load href="__PUBLIC__/Js/Accounting/jquery.combo.js" />
    <load href="__PUBLIC__/Js/Accounting/accounting.js" />
    <load href="__PUBLIC__/Js/Accounting/spinbox.js" />
    <load href="__PUBLIC__/Js/Accounting/calculator.js" />
    <load href="__PUBLIC__/Js/Accounting/Voucher.js" />
    <load href="__PUBLIC__/Js/Accounting/VoucherInit.js" />
</block>